<head>
<meta charset="utf-8" />
</head>
<!-- BEGIN PAGE CONTAINER-->
<div id="pageContainer" class="container-fluid">
    <!-- BEGIN PAGE HEADER-->
    <div class="row-fluid">
        <div class="span12">
            <!-- BEGIN PAGE TITLE & BREADCRUMB-->
            <h3 class="page-title">财富 - GPS <small id="displayTitle"></small>


        </h3>
            <ul class="breadcrumb">
                <li><a href="index"><i class="icon-home"></i></a><span class="divider"></span></li>
                <li><a href="#">财富 - 导航</a> <span class="divider">&nbsp;</span></li>

        </ul> <!-- END PAGE TITLE & BREADCRUMB-->
    </div>
</div> <!-- END PAGE HEADER--> <!-- BEGIN PAGE CONTENT-->
    <div id="page" class="dashboard">
        <!-- BEGIN OVERVIEW Over All BLOCKS-->

        <div class="row-fluid circle-state-overview">
            <div class="span8">
                <div class="widget">
                    <div class="widget-title">
                        <h4><i class="icon-money"></i> 财富概况</h4> <small></small> <span class="tools"> <a href="javascript:;" class="icon-chevron-down"></a> <a href="javascript:;"
                            class="icon-remove"
                        ></a>
                    </span>
                </div>
                    <div class="widget-body">
                        <div class="row-fluid circle-state-overview">
                            <div class="span6 responsive clearfix" data-tablet="span3" data-desktop="span6">
                                <div class="circle-wrap">
                                    <div class="stats-circle turquoise-color"><i class="icon-briefcase"></i></div>
                                    <p><strong id="startamount"></strong> 账户起始总额</p>
                            </div>
                        </div>

                            <div class="span6 responsive" data-tablet="span3" data-desktop="span6">
                                <div class="circle-wrap">
                                    <div class="stats-circle green-color"><i class="icon-book"></i></div>
                                    <p><strong id="totalamount"></strong> 体验账户现值总额</p>
                            </div>
                        </div>

                    </div>
                </div> <!-- END OVERVIEW STATISTIC BLOCKS-->
            </div>
        </div>
            <div class="span4">
                <!-- BEGIN ALERTS PORTLET-->
                <div class="widget">
                    <div class="widget-title">
                        <h4><i class="icon-bell-alt"></i> 财富提醒</h4> <span class="tools"> <a href="javascript:;" class="icon-chevron-down"></a> <a href="javascript:;" class="icon-remove"></a>
                    </span>
                </div>
                    <div class="widget-body"><c:forEach items="${alertmessages}" var="String">

                            <div class="alert">
                                <button class="close" data-dismiss="alert">×</button> <strong>提示： </strong> ${String}"
                            </div>
                        </c:forEach> <span class="space5"></span></div>
            </div> <!-- END ALERTS PORTLET-->
        </div>

    </div> <!-- Start goal-->
        <div cneass="row-fluid">
            <div class="span6">
                <!-- Start goalmeter Summary-->
                <div class="widget">
                    <div class="widget-title">
                        <h4><i class="icon-bar-chart"></i> 目标达成速率</h4> <span class="tools"> <a href="javascript:;" class="icon-chevron-down"></a> <a href="javascript:;" class="icon-remove"></a>
                    </span>
                </div>
                    <div class="widget-body" id="goalmeter"></div>
            </div> <!-- End Portifio Summary-->
        </div>

            <div class="span6">
                <!-- Start Portifio Summary-->
                <div class="widget">
                    <div class="widget-title">
                        <h4><i class="icon-bar-chart"></i> 目标达成进度</h4> <span class="tools"> <a href="javascript:;" class="icon-chevron-down"></a> <a href="javascript:;" class="icon-remove"></a>
                    </span>
                </div>
                    <div class="widget-body" id="goalProgress"></div>
            </div> <!-- End Portifio Summary-->
        </div>
    </div> <!-- Start portifolio-->
        <div cneass="row-fluid">
            <div class="span6">
                <!-- Start Portifio Summary-->
                <div class="widget">
                    <div class="widget-title">
                        <h4><i class="icon-bar-chart"></i> 投资组合详解</h4> <span class="tools"> <a href="javascript:;" class="icon-chevron-down"></a> <a href="javascript:;" class="icon-remove"></a>
                    </span>
                </div>
                    <div class="widget-body" id="portifolioChart"></div>
            </div> <!-- End Portifio Summary-->
        </div>

            <div class="span6">
                <!-- Start Portifio Summary-->
                <div class="widget">
                    <div class="widget-title">
                        <h4><i class="icon-bar-chart"></i> 投资组合走势图</h4> <span class="tools"> <a href="javascript:;" class="icon-chevron-down"></a> <a href="javascript:;" class="icon-remove"></a>
                    </span>
                </div>
                    <div class="widget-body" id="portifolioTrendChart"></div>
            </div> <!-- End Portifio Summary-->
        </div>
    </div>
</div> <!-- END PAGE CONTENT-->
</div>
<!-- END PAGE CONTAINER--> 
 <script type="text/javascript" src="../assets/gps/portifolio.js"></script>
    <script type="text/javascript" src="../assets/gps/goalmeter.js"></script>
    <script type="text/javascript" src="../assets/gps/goalProgress.js"></script>
    <script type="text/javascript" src="../assets/gps/portifolioTrend.js"></script>
<script>
var stock, bonds,ppdatelist,totalamountlist,totalamount,startamount,getDashboardURL;

    $(document).ready(function(){
    	var displayname=$("#displayname").val();
    	var id=$("#id").val(); 
		
		$("#displayTitle").append(displayname+"的财富导航");
    	
    	getDashboardURL="/getDashboard/"+id;    	
        
    	$.ajax({
    		type : "GET",
    		contentType : "application/json",
    		url : getDashboardURL,
    		dataType : 'json',
    		timeout : 10000,
    		success : function(data) {
    			
    			stock =data.cam.stockportion;
    		    bonds =data.cam.bondsportion;
    		    ppdatelist =data.ppdatelist;
    		    totalamountlist =data.totalamountlist;
    		    totalamount=totalamountlist[0];
    		    startamount=data.goal.startamount;
    		    $("#totalamount").append(totalamount);
    		    $("#startamount").append(startamount);
    		    
    		    goalmeter();      
    		    goalProgress();  
    	        portifolio();
    	        portifolioTrend();
    		   
    		    
    		},
    	
    	error : function(XMLHttpRequest, textStatus, errorThrown) {
    		console.log(XMLHttpRequest.status);
    		console.log(XMLHttpRequest.readyState);
    		console.log(textStatus);
    	},
    	done : function(e) {
    		console.log("done");
    		console.log
    	}
    }); 
}); 
   

  
</script>